import { loadFontFace } from '@tarojs/taro'
const CloudFonts = {
	思源黑体:
		'https://636c-cloud1-0g1tg2fnddbcfb9a-1325753704.tcb.qcloud.la/font/%E6%80%9D%E6%BA%90%E9%BB%91%E4%BD%93/SourceHanSansCN-Regular%231.otf?sign=5f976c4bbcb411cb6a10f4a6568dd693&t=1714572997',
}

export const globalImportFonts = () => {
	Object.keys(CloudFonts).forEach((fontFamilyName) => {
		loadFontFace({
			family: fontFamilyName,
			source: `url("${CloudFonts[fontFamilyName]}")`,
			global: true,
			fail: () => {},
		})
	})
}
